/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package marifnst.jse71.using_loop_constructs;

/**
 *
 * @author arifnasution
 */
public class BreakContinue
{

    public void sampleBreakContinue()
    {
        System.out.println( "=== sample break continue" );
        for ( int i = 0; i < 10; i++ )
        {
            if ( i % 2 == 0 )
            {
                System.out.println( "sample break continue : " + i );
            } else if ( i == 5 )
            {
                System.out.println( "break when i == 5" );
            } else
            {
                System.out.println( "continue when i mod 2 not equal 0" );
                continue;
            }
        }
    }
}
